import allure

from api.info import InfoAPI


class TestGetUnionSubBankInfo:

    # 前置处理
    def setup_method(self):
        self.info_api = InfoAPI()

    @allure.title("银联支行行号查询接口")
    def test01_success(self):
        # data = {
        #     "type": "2",
        #     "serviceCode": "agent"
        # }
        data = {
            "type": "1",
            "provinceCode": "3600",
            "cityCode": "3680",
            "bankCode": "15003363",
            "serviceCode": "agent"
        }
        for i in range(50):
            res = self.info_api.getUnionSubBankInfo(data=data)
            print(res.json())
            assert 200 == res.status_code
